﻿/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine - DirectX 10 Plugin
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#define DIRECTX_10_PLUGIN_SOURCE 1

#include "DirectX_10_Plugin.h"
//#include "systemclass.h"
#include <Windows.h>

#include <assert.h>

#include <vector>
#include <string>

#include <algorithm>

#include <sstream>

using namespace std;
using namespace Omen;

// Instantiation of global kernel pointer
static IKernel* pOmenKernel;

//=============================================================================
/**
**
**
*/

/// <summary>Retrieve the engine version we're going to expect</summary>
extern "C" DIRECTX_10_PLUGIN_API int getEngineVersion()
{
    return 1;
}

/// <summary>Register the plugin to an engine kernel</summary>
/// <param name="kernel">Kernel the plugin will register to</summary>
extern "C" DIRECTX_10_PLUGIN_API void registerPlugin(Omen::IKernel* kernel) 
{
    pOmenKernel = kernel;

    kernel->getGraphicsServer()->addGraphicsDriver(new DirectX_10_GraphicsDriver);
    kernel->getInputServer()->addInputDriver(new DirectX_10_InputDriver);
    kernel->getStorageServer()->addImageFileReader( new DirectX_10_ImageReader );
}

//=============================================================================
/**
** <summary>Destroys an DirectX_10_ graphics driver</summary>
**
*/
/*DirectX_10_GraphicsDriver::~DirectX_10_GraphicsDriver() 
{ 
}*/

//=============================================================================
/**
** <summary>Gets the name of the graphics driver</summary>
**
*/
const std::wstring & DirectX_10_GraphicsDriver::getName() const 
{
    static wstring sName(L"DirectX_10_ graphics driver");
    return sName;
}



